package com.lizheng.yunservice.goods.controller;


import com.lizheng.yunservice.common.domain.ApiRestResponse;
import com.lizheng.yunservice.goods.model.VO.VtpGoodsSellerVO;
import com.lizheng.yunservice.goods.service.IVtpGoodsSellerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/vtp/app/goodsSeller")
public class VtpGoodsSellerController {

    @Autowired
    private IVtpGoodsSellerService goodsSellerService;

    @GetMapping("/list/{goodsId}")
    public ApiRestResponse<List<VtpGoodsSellerVO>> listGoodsSellers(@PathVariable Long goodsId) {
        List<VtpGoodsSellerVO> sellers = goodsSellerService.getByGoodsId(goodsId);
        return ApiRestResponse.ok("操作成功", sellers);
    }
}